<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/FCKeditor.tld" prefix="fck"%>
<%@ page import = "com.project.model.Food"%>
<%@ page import = "com.project.control.DateControl"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>增加动态</title>
     <link href="../../../resources/css/admin/pages_member.css" rel="stylesheet" type="text/css"/> 
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
  </head>
  
  <body>
  		 <%
  		 	request.setCharacterEncoding("UTF-8");
		  	String href="food_add.jsp";
		  	Food food = new Food();
		  	DateControl dc = new DateControl();
		  	String addtime = dc.Date();
		%>
		
		 
  	 <script type="text/javascript">
	 function checkform(form){
	     if(form.content.value==""){
	  		alert("内容不能为空!");
	  		window.location.href="<%=href%>";
	  		form.content.focus();
	  		return false;
	  		}
	  	
	  	}
  </script>
  

  <form name="f" action="food_adddo.jsp" method="post" onSubmit="return checkform(this);">
  <table align="center">
  <tr>
  <td>标题</td><td><input type="text" id="title" name="title" /></td>
  </tr>
  <tr>
  <td>作者</td><td><input type="text" id="editor" name="editor" /></td>
  </tr>
  <tr>
  <td>转帖来自</td><td><input type="text" id="original" name="original" /></td>
  </tr>
  <tr>
	<td width="150" class="items">发布时间</td>
	<td class="left"><label for="textfield"></label>
		<input type="text" id="addtime" readonly="true" name="addtime" value="<%=addtime%>">

    </td>
    </tr>
  <tr>
  <td>类别</td>
  <td><select name=type>
	  <option selected="selected"></option>
	  <option value=0 selected>东师食堂</option>
	  <option value=1>食物搭配</option>
	  <option value=2>食物禁忌</option>
      </select>
  </td>
  </tr>
  <tr>
  <td>内容：</td>
  <td>
           <fck:editor id="content1" basePath="/dongshilife1/fckeditor/" height="450"
				width="900" skinPath="/dongshilife1/fckeditor/editor/skins/office2003/" toolbarSet="Default"
				imageBrowserURL="/dongshilife1/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
				linkBrowserURL="/dongshilife1/fckeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
				flashBrowserURL="/dongshilife1/fckeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
				imageUploadURL="/dongshilife1/fckeditor/editor/filemanager/upload/simpleuploader?Type=Image"
				linkUploadURL="/dongshilife1/fckeditor/editor/filemanager/upload/simpleuploader?Type=File"
				flashUploadURL="/dongshilife1/fckeditor/editor/filemanager/upload/simpleuploader?Type=Flash">
			</fck:editor></td>
  </tr>
  </table>
  <div><input type="submit" id="submit" value="提交"/>&nbsp;
	   <input type="reset" value="取消" onClick="window.location.href='food.jsp'"/>
	   <input type="reset" value="重置">
  </div>
  </form>
</body>
</html>